#include <vector>
#include <string>
#include <iostream>

using namespace std;

int climbbuilding(int floor, int max){
    int result = 0;
    if(floor == 0 || floor == 1){
        result = 1;
    }
    else{
        for(int i = 1; i <= max; ++i){
            result += climbbuilding(floor-i, max);
        }
    }
    return result;
}

int main(int argc, char const *argv[])
{
    int floor = 5;
    int max = 2;
    cout << climbbuilding(floor, max);
    return 0;
}